# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-docstring-parser
_pkgname=docstring_parser
pkgver=0.17.0
pkgrel=1
pkgdesc='Parse Python docstrings. Currently support ReST, Google, and Numpydoc-style docstrings.'
arch=('any')
url='https://pypi.org/project/docstring-parser/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/docstring_parser-$pkgver.tar.gz")
sha512sums=('4703157db7d7e0d205a44987910396d317f711799d58e458184b00987f21c31ab756369affc324505e9d98c180ee2cb785a60df7fad8382eb6e11ef8e3579bd9')

build() {
  cd $_pkgname-$pkgver

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd $_pkgname-$pkgver

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

